package com.qixin.api.controller;


import com.alibaba.fastjson.JSONObject;
import com.qixin.api.bean.ComPeople;
import com.qixin.api.bean.ResultPage;
import com.qixin.api.bean.VoPage;
import com.qixin.api.bean.WePilejoin;
import com.qixin.api.service.WePilejoinService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * 桩源加盟 前端控制器
 * </p>
 *
 * @author 李许多
 * @since 2018-11-15
 */
@Controller
@RequestMapping("/wePilejoin")
public class WePilejoinController {
    @Autowired
    WePilejoinService wePilejoinService;
    @RequestMapping("/select")
    @ResponseBody
    public ResultPage<WePilejoin> list(VoPage voPage) {
        ResultPage<WePilejoin> resultPage=wePilejoinService.selectALL(voPage);
        return  resultPage;
    }

    /**
     * 跳转页面
     * @return
     */
    @RequestMapping("/main.html")
    public String detail(){
        return "renzheng/pile";

    }
    /**
     * 修改
     * @param param
     * @return
     */
    @RequestMapping("/updatecheck")
    @ResponseBody
    public  boolean updatecheck(String param){
        WePilejoin wePilejoin  = JSONObject.parseObject(param, WePilejoin.class);
        if(wePilejoinService.updateById(wePilejoin)){
            return  true;
        }else{
            return false;
        }
    }
    /**
     * 跳转页面
     * @return
     */
    @RequestMapping("/check")
    public String check(){
        return "renzheng/pilecheck";

    }
}
